#include <fhe/core/Node.h>
#include <cstdio>

using namespace fhe;
using namespace core;

int main( int argc, char** argv )
{
//   try
//   {
    FHE_ASSERT_MSG( argc == 2, "usage: %s <simfile>", argv[0] );
    Node::Ptr root = Node::load( argv[1] );
    if ( root->hasFunc( "run" ) )
    {
      root->call( "run" );
    }
    root->save( "test.xml" );
//   }
//   catch ( std::exception e )
//   {
//     fprintf( stderr, "failed to run fhe:\n%s", e.what() );
//   }
  return 0;
}
